package com.qiku.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qiku.course.entity.Course;
import com.qiku.course.entity.CourseDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

@Mapper
public interface CourseMapper extends BaseMapper<Course> {

    /**
     * 查询全部课程信息
     * @return
     */
    public List<Course> getAllCourse();


    /**
     * 查询已经登录的用户购买的课程信息
     */
    public List<Course>  getCourseByUserId(@Param("userId") Integer userId);


    /**
     * 查询某门课程的详细信息
     * @param courseId
     * @return
     */
    public Course getCourseById(@Param("courseId") Integer courseId);





}
